<%inherit file="../../dashboard/base.html" />
<%! from django.shortcuts import reverse %>
<%def name="content()">
<form class="edit-area" action="${reverse('update')}" method="post" style="width: 18%;margin: 0 auto;margin-top: 7%">
    <div class="form-group">
        <label>用户名：</label>
        <input type="text" value="${user.username}" name="username" class="form-control" placeholder="用户名">
    </div>
    <div class="form-group">
        <label>密码：</label>
        <input type="password" name="password" class="form-control" placeholder="密码">
    </div>
    <div class="form-group">
        <label>性别：</label>
        % if user.gender=='male':
        <input name="gender"  type="radio" checked="checked" value="male"/>男
        <input name="gender"  type="radio" value="female"/>女
        % else:
        <input name="gender"  type="radio" value="male"/>男
        <input name="gender"  type="radio" checked="checked" value="female"/>女
        % endif
    </div>
    <div class="form-group">
        <label>年龄：</label>
        <input type="text" value="${user.age}" name="age" class="form-control" placeholder="年龄">
    </div>
    <div class="form-group">
        <label>邮箱：</label>
        <input type="text" value="${user.email}" name="email" class="form-control" placeholder="邮箱">
    </div>
    <div class="form-group">
        <label>职业：</label>
        <input type="text" value="${user.job}" name="job" class="form-control" placeholder="职业">
    </div>
    <button type="submit" class="btn btn-info" style="display: inline-block">修改</button><br/>
    ${error}
</form>
</%def>